package com.zhouixi.ras_js_java.utils;

import com.zhouixi.ras_js_java.enums.ResultEnum;

public class RetResult <T>{
	public int code;

	private String msg;

	private T data;

	public RetResult<T> setCode(ResultEnum retCode) {
		this.code = retCode.getCode();
		this.msg =  retCode.getMsg();
		return this;
	}

	public int getCode() {
		return code;
	}

	public RetResult<T> setCode(int code) {
		this.code = code;
		return this;
	}

	public String getMsg() {
		return msg;
	}

	public RetResult<T> setMsg(String msg) {
		this.msg = msg;
		return this;
	}

	public T getData() {
		return data;
	}

	public RetResult<T> setData(T data) {
		this.data = data;
		return this;
	}
}
